﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media;

namespace DetectApp.Display;

[Serializable]
public class ROIInfo
{
    public ROIType ROIType { get; set; }
    //矩形
    public double len1 { get; set; }
    public double len2 { get; set; }
    public double phi { get; set; }
    public double RectX { get; set; }
    public double RectY { get; set; }
    public Point CenterPoint1 { get; set; }
    public Point CenterPoint2 { get; set; }
    public double rectStartPhi { get; set; }
    public double rectEndPhi { get; set; }
    public Point CircleCenter { get; set; }
    public double circleRadius { get; set; }
    public Point rect_p1 { get; set; }
    public Point rect_p2 { get; set; }
    public Point rect_p3 { get; set; }
    public Point rect_p4 { get; set; }

    public double CircleX { get; set; }
    public double CircleY { get; set; }
    public double Radius { get; set; }

    public double StartX { get; set; }
    public double StartY { get; set; }
    public double EndX { get; set; }
    public double EndY { get; set; }

    public double StartAngle { get; set; }
    public double EndAngle { get; set; }

    public double RingStartAngle { get; set; }
    public double RingEndAngle { get; set; }
    public double RingRadius { get; set; }
    public Point RingCenter { get; set; }
    public double RingWidth { get; set; }
    public SweepDirection SweepDirection { get; set; }

    //完整圆环
    public Point aring_center1;

    public Point aring_center2;
    public double aring_radius1;
    public double aring_radius2;
}

public enum ROIType
{
    无,
    矩形,
    圆,
    直线,
    圆弧,
    圆环,
    封闭曲线,
    多边形,
    完整圆环,
}

/// <summary>
/// 用来保存ROI
/// </summary>
[Serializable]
public class ROIParam
{
    /// <summary>
    /// 类型
    /// </summary>
    public ROIType ROIType;

    public double Left;
    public double Top;

    //矩形
    public Point Point1;

    public Point Point2;
    public Point Point3;
    public Point Point4;

    //圆环
    public double ring_startX;

    public double ring_startY;

    public double ring_pointx1;
    public double ring_pointy1;
    public double ring_width1;
    public double ring_height1;
    public bool ring_IsLarge1;
    public SweepDirection ring_sweepDirection1;

    public double ring_pointx2;
    public double ring_pointy2;

    public double ring_width2;
    public double ring_height2;
    public double ring_pointx3;
    public double ring_pointy3;
    public bool ring_IsLarge3;
    public SweepDirection ring_sweepDirection3;

    //圆
    public double circle_width;

    public double circle_height;

    //封闭曲线
    public Point close_start;

    public List<Point> close_points;

    //直线
    public Point line_start;

    public Point line_end;

    //圆弧
    public Point arc_start;

    public Point arc_end;
    public Point arc_center;
    public double arc_width;
    public double arc_height;

    //完整圆环
    public Point aring_center1;

    public Point aring_center2;
    public double aring_radius1;
    public double aring_radius2;

}